Skip to content

Polish translation of cheatsheets page #630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 21, 2016
Merged

Polish translation of cheatsheets page #630

merged 3 commits into from
Nov 21, 2016

Conversation

starsep
Copy link
Contributor

@starsep starsep commented Nov 18, 2016

I've added polish translation of cheatsheets page. You can find it here.

@charafau
Copy link
Contributor

Thank you, I will make a review as soon as possible.

@starsep
Copy link
Contributor Author

starsep commented Nov 18, 2016

I'll highly appreciate any feedback.
I'm not a translator so many terms might be translated in a rather artificial, clumsy way (maybe leaving English terms would be better?). Neither I am a Scala programmer, I've just started my journey with this language so some concepts might be unclear to me.
Thank you for your quick answer.

@charafau
Copy link
Contributor

You should also add link you your translation on other pages, not only on English one.

  • /ba/cheatsheets/index.md
  • /fr/cheatsheets/index.md
  • /ja/cheatsheets/index.md
  • /pt-br/cheatsheets/index.md

@starsep
Copy link
Contributor Author

starsep commented Nov 20, 2016

AFAIK there is no need.
I believe that https://github.com/scala/scala.github.com/blob/master/_includes/cheatsheet-sidebar.txt#L20 takes care about proper links.

Edit: Bad for, link was to line 31, now 20.

| ------ | ------ |
| <span id="variables" class="h2">zmienne</span> | |
| `var x = 5` | zmienna |
| <span class="label success">Dobrze</span> `val x = 5`<br> <span class="label important">Żle</span> `x=6` | stała |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not Żle but Źle.

istranslation: true
title: Scalacheat
by: Filip Czaplicki
about: Dzięki <a href="http://brenocon.com/">Brendan O'Connor</a>. Ten cheatsheet ma być szybkim podsumowaniem konstrukcji składniowych Scali. Licencjonowany przez Brendan O'Connor pod licencją CC-BY-SA 3.0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "Podziękowania dla Brendan O'Connor." would be better.

| <span class="label success">Dobrze</span> `(1 to 5).map(2*)`<br> <span class="label important">Źle</span> `(1 to 5).map(*2)` | funkcja anonimowa: związana metoda infiksowa. Możesz użyć także `2*_`. |
| `(1 to 5).map { x => val y=x*2; println(y); y }` | funkcja anonimowa: z bloku zwracane jest ostatnie wyrażenie. |
| `(1 to 5) filter {_%2 == 0} map {_*2}` | funkcja anonimowa: styl potokowy. (lub ponawiasowane). |
| `def compose(g:R=>R, h:R=>R) = (x:R) => g(h(x))` <br> `val f = compose({_*2}, {_-1})` | funkcja anonimowa: aby przekazać kilka bloków musisz ponawiasować. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

funkcja anonimowa: aby przekazać kilka bloków musisz użyć nawiasów.

| `5.+(3); 5 + 3` <br> `(1 to 5) map (_*2)` | lukier składniowy dla operatorów infiksowych. |
| `def sum(args: Int*) = args.reduceLeft(_+_)` | zmienna liczba argumentów funkcji. |
| <span id="packages" class="h2">pakiety</span> | |
| `import scala.collection._` | import z dżokerem. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this one, maybe import wszystkiego z danego pakietu would be better?

| `var (x,y,z) = (1,2,3)` | przypisanie z podziałem: rozpakowywanie krotki przy pomocy dopasowywania wzorca. |
| <span class="label important">Źle</span>`var x,y,z = (1,2,3)` | ukryty błąd: do każdego przypisana cała krotka. |
| `var xs = List(1,2,3)` | lista (niezmienna). |
| `xs(2)` | indeksowanie za pomocą nawiasów. ([slides](http://www.slideshare.net/Odersky/fosdem-2009-1013261/27)) |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slajdy

| `while (x < 5) { println(x); x += 1}` | pętla while. |
| `do { println(x); x += 1} while (x < 5)` | pętla do while. |
| `import scala.util.control.Breaks._`<br>`breakable {`<br>` for (x <- xs) {`<br>` if (Math.random < 0.1) break`<br>` }`<br>`}`| instrukcja przerwania pętli (break). ([slides](http://www.slideshare.net/Odersky/fosdem-2009-1013261/21)) |
| `for (x <- xs if x%2 == 0) yield x*10` _to samo co_ <br>`xs.filter(_%2 == 0).map(_*10)` | zrozumienie pętli for: filtrowanie / mapowanie |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instrukcja for: fultrowanie / mapowanie and please change zrozumienie to instrukcja

| `for (i <- 1 to 5) {`<br> `println(i)`<br>`}` | zrozumienie pętli for: iterowanie aż do górnej granicy |
| `for (i <- 1 until 5) {`<br> `println(i)`<br>`}` | zrozumienie pętli for: iterowanie poniżej górnej granicy |
| <span id="pattern_matching" class="h2">pattern matching (dopasowywanie wzorca)</span> | |
| <span class="label success">Dobrze</span> `(xs zip ys) map { case (x,y) => x*y }`<br> <span class="label important">Źle</span> `(xs zip ys) map( (x,y) => x*y )` | używaj słowa kluczowego case w funkcjach w celu dopasowywania wzorca. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

używaj słowa kluczowego case w funkcjach w celu dopasowywania wzorca. (pattern matching) would be better - since everyone knows what pattern matching is, it will be easier to search for reference

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this suggestion. Do you want me to replace something with (pattern matching)? I've added that phrase at the end.

@charafau
Copy link
Contributor

Thanks ! LGTM from me. Dont know if someone else can take a look too. @SethTisue what do you think?

@SethTisue SethTisue merged commit 07e420a into scala:master Nov 21, 2016
@SethTisue
Copy link
Member

thanks Filip & Rafal!

@mpociecha
Copy link
Contributor

zostaje wypisywane - I'd write jest wypisywane or zostaje wypisane but:

  1. I'm a bit late.
  2. It doesn't really matter. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants